package com.xnyzc.lhy.didi.controller.work;

import com.xnyzc.lhy.common.entity.DiDiRv;
import com.xnyzc.lhy.didi.entity.param.operation.CloseOrderParam;
import com.xnyzc.lhy.didi.entity.param.work.*;
import com.xnyzc.lhy.didi.service.impl.checkstand.CheckstandServiceImpl;
import com.xnyzc.lhy.didi.service.work.WorkService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 调用滴滴工单相关服务
 * </p>
 *
 * @author wangshuo
 * @since 2019-10-07
 */
@RestController
@RequestMapping("oa/didi/work")
public class WorkController {

    @Autowired
    private WorkService workService;

    /**
     * 新建工单
     *
     * @param createWorkParam
     * @return
     */
    @ApiOperation(value = "新建工单", notes = "新建工单")
    @PostMapping(value = "/getCreateWork")
    public DiDiRv getCreateWork(@ApiParam(name =
            "createWorkParam", value = "新建工单") @RequestBody CreateWorkParam createWorkParam) {
        return workService.getCreateWork(createWorkParam);
    }

    /**
     * 更新工单接口
     *
     * @param updateWorkParam
     * @return
     */
    @ApiOperation(value = "更新工单接口", notes = "更新工单接口")
    @PostMapping(value = "/getUpdateWork")
    public DiDiRv getUpdateWork(@ApiParam(name =
            "updateWorkParam", value = "更新工单接口") @RequestBody UpdateWorkParam updateWorkParam) {
        return workService.getUpdateWork(updateWorkParam);
    }

    /**
     * 解绑虚拟号接口
     *
     * @param param
     * @return
     */
    @ApiOperation(value = "解绑虚拟号接口", notes = "解绑虚拟号接口")
    @PostMapping(value = "/getUnbundleNumber")
    public DiDiRv getUnbundleNumber(@ApiParam(name =
            "param", value = "解绑虚拟号接口") @RequestBody UnbundleVirtualNumberParam param) {
        return workService.getUnbundleNumber(param);
    }

    /**
     * 绑定虚拟号接口
     *
     * @param virtualNumberParam
     * @return
     */
    @ApiOperation(value = "绑定虚拟号接口", notes = "绑定虚拟号接口")
    @PostMapping(value = "/getBindNumber")
    public DiDiRv getBindNumber(@ApiParam(name =
            "virtualNumberParam", value = "绑定虚拟号接口") @RequestBody BindVirtualNumberParam virtualNumberParam) {
        return workService.getBindNumber(virtualNumberParam);
    }

    /**
     * 工单加急接口
     *
     * @param workUrgentParam
     * @return
     */
    @ApiOperation(value = "工单加急接口", notes = "工单加急接口")
    @PostMapping(value = "/getWorkUrgent")
    public DiDiRv getWorkUrgent(@ApiParam(name =
            "workUrgentParam", value = "工单加急接口") @RequestBody WorkUrgentParam workUrgentParam) {
        return workService.getWorkUrgent(workUrgentParam);
    }

}
